using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class cardiovascular_eventMap : EntityTypeConfiguration<cardiovascular_event>
    {
        public cardiovascular_eventMap()
        {
            // Primary Key
            this.HasKey(t => t.cardiovascular_event_id);

            // Properties
            this.Property(t => t.patient_id)
                .HasMaxLength(20);

            this.Property(t => t.cardiovascular_event_name)
                .HasMaxLength(100);

            this.Property(t => t.cardiovascular_event_diagnose_means)
                .HasMaxLength(200);

            this.Property(t => t.cardiovascular_event_CT_id)
                .HasMaxLength(20);

            this.Property(t => t.cardiovascular_event_pic_id)
                .HasMaxLength(20);

            this.Property(t => t.cardiovascular_event_MRI_id)
                .HasMaxLength(20);

            this.Property(t => t.cardiovascular_event_other_id)
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("cardiovascular_event");
            this.Property(t => t.cardiovascular_event_id).HasColumnName("cardiovascular_event_id");
            this.Property(t => t.patient_id).HasColumnName("patient_id");
            this.Property(t => t.follow_up_id).HasColumnName("follow_up_id");
            this.Property(t => t.cardiovascular_event_name).HasColumnName("cardiovascular_event_name");
            this.Property(t => t.cardiovascular_event_date).HasColumnName("cardiovascular_event_date");
            this.Property(t => t.cardiovascular_event_diagnose_means).HasColumnName("cardiovascular_event_diagnose_means");
            this.Property(t => t.cardiovascular_event_CT_id).HasColumnName("cardiovascular_event_CT_id");
            this.Property(t => t.cardiovascular_event_pic_id).HasColumnName("cardiovascular_event_pic_id");
            this.Property(t => t.cardiovascular_event_MRI_id).HasColumnName("cardiovascular_event_MRI_id");
            this.Property(t => t.cardiovascular_event_other_id).HasColumnName("cardiovascular_event_other_id");
        }
    }
}
